package com.fit.piris.dao.message;

import java.util.List;

import org.apache.tapestry5.hibernate.annotations.CommitAfter;

import com.fit.piris.entities.message.Message;
import com.fit.piris.entities.message.priority.MessagePriority;

public interface MessageDAO {

	@CommitAfter
	public boolean save(Message newMessage);

	@CommitAfter
	public boolean delete(Message Message);

	@CommitAfter
	public boolean update(Message Message);

	public List<Message> findAll();
	
	public List<Message> findAllForPriority(MessagePriority messagePriority);

	public Message findByID(Long id);

	@CommitAfter
	public boolean deleteByID(Long id);
}
